//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Windows;
using System.Windows.Data;
using OpenLS.UI.Interop;

namespace OpenLS.UI
{
    class InvertedMarginConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            RibbonWindow w = (RibbonWindow)value;
#if NET40
            return new Thickness (0);
#endif
            return new Thickness(0, 0, 0, -w.CaptionHeight);
            
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}
